package org.csu.code.api.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.stereotype.Component;

import java.util.Date;

@Data
@Component
@TableName("farmcomment")
public class FarmComment {
    @TableId(value = "commentid",type = IdType.INPUT)
    private int commentId;
    @TableField(value = "userid")
    private int userId;
    @TableField(value = "farmid")
    private int farmId;
    private String content;
    private int likednum;
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+08")
    private Date date;
}
